package com.controller;

import com.entity.ReplyAgainInfo;
import com.service.ReplyAgainInfoService;
import com.vo.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 帖子再次回复控制器
 *
 * @author lbb
 * @version 1.0
 * @date 2020.3.3
 */
@RestController
@RequestMapping("/api")
public class ReplyAgainInfoController {
	
	@Autowired
	private ReplyAgainInfoService replyAgainInfoService;
	
	/**
	 * 在此回复
	 * @param replyAgainInfo 回复内容
	 * @return
	 */
	@PostMapping("/replyAgainInfo/add")
	public ResponseVO addReplyAgainInfo(@RequestBody ReplyAgainInfo replyAgainInfo) {
		Boolean bool = replyAgainInfoService.addReplyAgainInfo(replyAgainInfo);
		if (bool) {
			return new ResponseVO("200","回复成功",null);
		} else {
			return new ResponseVO("500","回复失败",null);
		}
	}
}
